home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 015a / qw12inst.zip / BUFFERS.TEC < prev    next >
Text File  |  1991-12-26  |  7KB  |  136 lines

  1. ID:BF BUFFERS
  2. Quarterdeck Technical Bulletin #226
  3. by Russell Bell
  4.  
  5.      The purpose of this document is to discuss the function of DOS 
  6. BUFFERS, how DOS allocates them, and how the Quarterdeck memory managers 
  7. (QEMM-386 and QEMM 50/60) and the memory enhancer, QRAM, deal with 
  8. BUFFERS.
  9.  
  10. What is a BUFFER?
  11.  
  12.       A BUFFER is a portion of memory that DOS sets aside for buffering 
  13. disk I/O.  DOS stores directories and partial blocks here.  DOS must 
  14. read a full sector of information from the disk.  If the application 
  15. asks for an amount of information that is not an exact multiple of the 
  16. sector size then the whole sector must be stored somewhere while DOS 
  17. gives the partial amount asked for to the application that asked for it. 
  18. DOS uses BUFFERS to store directories because it needs somewhere to 
  19. store information for its own use.
  20.  
  21. Where are the BUFFERS?
  22.  
  23.      DOS keeps one BUFFER in the kernel to make sure that it has at 
  24. least one at all times.  The rest are loaded as "Added Data" and may be 
  25. seen on the "DOS/Overview" page of MANIFEST.
  26.  
  27. How big are BUFFERS?
  28.  
  29.      Each BUFFER takes 528 bytes unless you are using DOS version 2.x or 
  30. 3.x and you are using a third-party disk manager (like On-Track's "Disk 
  31. Manager") to create logical partition(s) larger than 32 MB.  In this 
  32. case, the size of each BUFFER doubles (to 1056 bytes) for partitions 
  33. between 33-64 MB, doubles again (to 2112 bytes) for partitions between 
  34. 65-128 MB, and again (to 4224 bytes) for partitions between 128-256 MB, 
  35. and so on.  This is because in these versions of DOS the size of the 
  36. BUFFER must follow the size of the sector; the third-party disk 
  37. partitioners double the size of the sector as needed.  You can see how 
  38. big your BUFFERS by looking at the "DOS/Overview" page of MANIFEST and 
  39. seeing how much memory your BUFFERS take. 
  40.      In DOS 4.x and 5.x the size of each BUFFER is fixed at 528 bytes.
  41.  
  42. How many BUFFERS do I need?
  43.  
  44.      You only need one BUFFER.  Any program that claims it needs more
  45. is really only making a recommendation.  Of course, your system will
  46. probably run slower if you have only one BUFFER, but no more than one
  47. is actually needed to operate.  You should consult the DOS manual for 
  48. suggestions about how many BUFFERS you should have.  
  49.      Disk caches may perform some of the same services that DOS BUFFERS 
  50. perform.  If you use a disk cache you should consult the recommendation 
  51. of the authors of the disk cache when deciding how many BUFFERS to 
  52. allocate. 
  53.      BUFFERS is actually an area of ram which is available for buffering 
  54. disk I/O; they are not used by the count. If you want 20 BUFFERS, what 
  55. you really mean is that you want 10KB of disk buffering.  If your 
  56. BUFFERS are larger than 528 bytes (see paragraph above, "How big are 
  57. BUFFERS") then you should decrease the number of BUFFERS to get the same 
  58. amount of buffering. 
  59.  
  60. What do QEMM-386, QEMM 50/60, and QRAM allow me to do with BUFFERS? 
  61.  
  62.      QEMM-386, QEMM 50/60, and QRAM allow BUFFERS (with the exception of 
  63. the first BUFFER) to be moved to high RAM with DOS versions 2.x and 3.x.  
  64. Quarterdeck does this with a program called BUFFERS.COM, which loads 
  65. BUFFERS at the DOS prompt and can be loaded high with Quarterdeck's 
  66. LOADHI.COM.  See the "The DOS Resources Programs" chapters in the QEMM 
  67. or QRAM manuals.  Note that Quarterdeck's OPTIMIZE program will decrease 
  68. the BUFFERS=?? statement from your original CONFIG.SYS to BUFFERS=1 on 
  69. DOS 2 and 3 systems because DOS will allocate more than one BUFFER by 
  70. default when no BUFFERS statement exists in the CONFIG.SYS.
  71.  
  72. What if I have DOS 4.x? 
  73.  
  74.      Microsoft changed the structure of BUFFERS in version 4.x of DOS.  
  75. At the same time Microsoft made it possible to move the BUFFERS into 
  76. Expanded memory.  Since it is a more efficient use of memory to put 
  77. BUFFERS into Expanded memory than to load them high Quarterdeck did not 
  78. change its BUFFERS.COM program to accommodate DOS version 4.x.  This 
  79. feature of DOS is invoked with the "/x" switch (BUFFERS=30/X, for 
  80. example).  Note that when BUFFERS are put into Expanded memory they are 
  81. allocated in multiples of 30, with a minimum of 30.  This is because 
  82. Expanded memory can be used in increments of 16 kilobytes only.  16 
  83. kilobytes can allocate 30 BUFFERS.  If you use "BUFFERS=20/X" you will 
  84. get 30 BUFFERS; if you use "BUFFERS=40/X" you will get 60 BUFFERS.
  85.      The /X parameter has proved to cause problems with many programs 
  86. and users who have problems when they put the BUFFERS into expanded 
  87. memory with this switch should stop doing so.   
  88.      Note that third party disk partitioners are not necessary with 
  89. version 4.x of DOS and the size of each BUFFER does not change with the 
  90. size of the largest disk partition.  
  91.  
  92. What if I have DOS 5.x?
  93.  
  94.      Microsoft changed the structure of BUFFERS again with version 5.  
  95. The BUFFERS can no longer be loaded into expanded memory.  If you use 
  96. the DOS=HIGH statement in the config.sys then the BUFFERS are loaded 
  97. into the HMA along with part of DOS's code.  The BUFFERS cannot be 
  98. broken up, part in the HMA, part low.  If you ask for more than will fit 
  99. into the HMA all of them will load low.
  100.      Third-party disk partitioners are not necessary to create 
  101. partitions larger than 32MB and the size of each BUFFER is constant in 
  102. DOS 5.
  103.  
  104. What about Compaq DOS 3.31? 
  105.  
  106.      Compaq DOS 3.31, like DOS 4, allows partitions of the hard disk 
  107. larger than 32 MB without a third-party partitioning program and without 
  108. increasing the size of a BUFFER.
  109.  
  110. TROUBLESHOOTING
  111.  
  112. My system is running very slowly.
  113.  
  114.      If your system seems to be running slowly after running 
  115. Quarterdeck's OPTIMIZE program, make sure that you have enough BUFFERS.
  116. You can see how many you have by looking the "DOS/Overview" page of
  117. MANIFEST.
  118.  
  119. Quarterdeck tells me that I need to have version 2.x or 3.x of DOS in 
  120. order to load BUFFERS high.
  121.  
  122.      This is indeed the case.  See "What if I have DOS 4.x?" and "What 
  123. if I have DOS 5.x?"
  124.  
  125. I seem to be losing a lot of memory somewhere.
  126.  
  127.      If you have DOS version 2.x or 3.x (but not Compaq DOS 3.31) and
  128. you are using a third-party disk partitioning program then the size of
  129. the individual BUFFER is increased to match the size of the sector. 
  130. You may want to decrease the number of BUFFERS you allocate.  See the
  131. paragraphs "How big are BUFFERS?" and "How many BUFFERS do I need?"
  132. above.
  133.  
  134.            Copyright (C) 1991 by Quarterdeck Office Systems
  135.                  * * *   E N D   O F   F I L E    * * *
  136.